<template>
 <div>
 <swiper :imgList="imgList"></swiper> // 封装 swiper 组件
 </div>
</template>
<script>
import swiper from '../components/swiper.vue' // 引入轮播图组件
export default {
 data () {
 return {
 imgList: [
 {id: 1, src: 'http://…'},
 {id: 2, src: 'http://…'}
 ]
 }
 },
 components: {
 swiper // 创建轮播图节点
 }
}
</script>
<template>
 <mt-swipe :auto="4000">
 <mt-swipe-item v-for="item in imgList" :key="item.id">
 <img :src="item.img">